package com.vegetable.modules.service.outbound.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vegetable.modules.entity.outbound.AllocationInDetail;
import com.vegetable.modules.mapper.outbound.AllocationInDetailMapper;
import com.vegetable.modules.service.outbound.IAllocationInDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 销售订货 服务类
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-27
 */
@Slf4j
@Service
public class AllocationInDetailServiceImpl extends ServiceImpl<AllocationInDetailMapper, AllocationInDetail> implements IAllocationInDetailService {


    @Override
    public List<AllocationInDetail> selectByOrderId(Long orderId) {
        QueryWrapper<AllocationInDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("in_order_id", orderId);
        return this.baseMapper.selectList(queryWrapper);
    }

    @Override
    public int insert(AllocationInDetail detail) {
        return this.baseMapper.insert(detail);
    }

}
